package cn.itrigger.dynamic.sql.condition.impl;

import cn.itrigger.dynamic.sql.condition.AbstractSingleValueCondition;

import java.util.function.Supplier;

/**
 * @author admin
 * @date 2018/9/20
 **/
public class IsNotEqualTo<T> extends AbstractSingleValueCondition<T> {

    protected IsNotEqualTo(Supplier<T> supplier) {
        super(supplier);
    }

    @Override
    public String renderCondition(String columnName, String placeholder) {
        return columnName + " != " + placeholder;
    }

    public static <T> IsNotEqualTo<T> of(Supplier<T> supplier) {
        return new IsNotEqualTo<>(supplier);
    }
}
